<?php


namespace app\admin\model;


use think\Model;

class Admin extends Model
{
    //字段信息
    protected $schema = [
        'id'=> 'int',
        'username'=>'string',
        'password'=>'string',
        'create_time'=>'int',
        'last_login_time'=>'int',
        'status'=>'int',
        'email'=>'string',
        'nick_name'=>'string'

    ];
    public function roles()
    {
        return $this->belongsToMany(Role::class, AdminRole::class);
    }

}